package com.yanmaohu.yulia.bean;

/**
 * @author Bright Lee
 */
public final class MultisetUnion implements MultisetValueExpression {

    private int beginIndex;
    private int endIndex;
    private boolean all;
    private boolean distinct;
    private MultisetValueExpression multisetValueExpression;
    private MultisetTerm multisetTerm;

    public MultisetUnion(MultisetValueExpression multisetValueExpression,
                         boolean all,
                         boolean distinct,
                         MultisetTerm multisetTerm) {
        this.beginIndex = multisetValueExpression.getBeginIndex();
        this.endIndex = multisetTerm.getEndIndex();
        this.multisetValueExpression = multisetValueExpression;
        this.all = all;
        this.distinct = distinct;
        this.multisetTerm = multisetTerm;
    }

    public int getBeginIndex() {
        return beginIndex;
    }

    public int getEndIndex() {
        return endIndex;
    }

    public MultisetValueExpression getMultisetValueExpression() {
        return multisetValueExpression;
    }

    public boolean isAll() {
        return all;
    }

    public boolean isDistinct() {
        return distinct;
    }

    public MultisetTerm getMultisetTerm() {
        return multisetTerm;
    }

}
